package com.sinosoft.ebusiness.util;

import com.bugull.mongo.BuguConnection;
import com.google.gson.Gson;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public abstract class AbsNosqlBasic<T> {

    private Class clazz;

    protected static Gson gson = new Gson();

    BuguConnection con = MongoUtils.getConnection();

    AbsNosqlBasic(){
        Type genType = getClass().getGenericSuperclass();
        Type[] params = ((ParameterizedType) genType).getActualTypeArguments();
        clazz =  (Class)params[0];
    }

    public boolean save(T t){
        return false;
    }

}
